﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="StockReceived.ascx.cs" Inherits="Admin_Components_Inventory_StockReceived" %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<telerik:RadScriptManager ID="ScriptManager2" runat="server" EnableTheming="True"></telerik:RadScriptManager>

<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<telerik:radformdecorator id="QsfFromDecorator" runat="server" decoratedcontrols="All"
            enableroundedcorners="false" />
        <telerik:RadTabStrip ID="TabStrip1" runat="server" EnableDragToReorder="true" Skin="Vista" MultiPageID="RadMultiPag1">
            <Tabs>
                <telerik:RadTab Text="NHẬN HÀNG LUÂN CHUYỂN" >
                </telerik:RadTab>
                <telerik:RadTab Text="TÌM KIẾM"></telerik:RadTab>
            </Tabs>
        </telerik:RadTabStrip>
        <telerik:RadMultiPage ID="RadMultiPag1" runat="server">
            <!--Tab thông tin chung -->
            <telerik:RadPageView ID="RadPageView1" runat="server"  Style="overflow: hidden">
                 <fieldset class="form" id="fsGeneral">
                  <br />
                <div class="form-horizontal wrapper-center clearfix">
                <!--Block bên trái -->
                 <div class="form-group col-md-6">
                     <!--Dòng -->
                    <div class="form-group">
                        <label class="col-md-3 control-label">
                            Mã luân chuyển hàng</label>
                        <div class="col-md-7">
                            <telerik:RadTextBox ID="txtTransferWarehouseCode" CssClass="col-imp-8 inputForm" Width="40px" runat="server" Enabled ="false" />
                        </div>
                    </div>
                  <!--End Dòng -->
                  <!--Dòng -->
                <div class="form-group">
                    <label class="col-md-3 control-label">Cửa hàng chuyển</label>
                    <div class="col-md-7">
                        <telerik:RadTextBox ID="txtFromShop" CssClass="col-imp-8 inputForm" Width="40px" runat="server" Enabled ="false" />
                        <asp:RequiredFieldValidator  ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtFromShop" ValidationGroup="g1"
                           ErrorMessage="Required(*)" InitialValue=""></asp:RequiredFieldValidator>
                        
                     </div>
                </div>
                <!--End Dòng -->
                <!--Dòng -->
                <div class="form-group">
                    <label class="col-md-3 control-label">Cửa hàng nhận</label>
                    <div class="col-md-7">
                        <telerik:RadTextBox ID="txtToShop" CssClass="col-imp-8 inputForm" Width="40px" runat="server" Enabled ="false" />
                        <asp:RequiredFieldValidator  ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtToShop" ValidationGroup="g1"
                           ErrorMessage="Required(*)" InitialValue=""></asp:RequiredFieldValidator>
                     </div>
                </div>
                <!--End Dòng -->
                <!--Dòng -->
                <div class="form-group">
                    <label class="col-md-3 control-label">Thuộc loại</label>
                    <div class="col-md-7">
                        <telerik:RadComboBox ID="cbType" runat="server" CssClass="col-imp-5" AllowCustomText="false" EmptyMessage="---Chọn---" filter="Contains">
                                <Items>
                                    <telerik:RadComboBoxItem Text="Gạo" Value="R" />
                                    <telerik:RadComboBoxItem Text="Quà tặng" Value="P" />
                                </Items>
                            </telerik:RadComboBox>
                        <asp:RequiredFieldValidator  ID="RequiredFieldValidator3" runat="server" ControlToValidate="cbType" ValidationGroup="g1"
                           ErrorMessage="Required(*)" InitialValue=""></asp:RequiredFieldValidator>
                     </div>
                </div>
                <!--End Dòng -->
                 <!--Dòng -->
                <div class="form-group">
                    <label class="col-md-3 control-label">Nhân viên giao</label>
                    <div class="col-md-7">
                        <telerik:RadTextBox ID="txtDeliveryPerson" CssClass="col-imp-8 inputForm" Width="40px" Enabled ="false" runat="server"  />
                     </div>
                </div>
                <!--End Dòng -->
                
                <!--Dòng -->
                <div class="form-group">
                    <label class="col-md-3 control-label">
                        Ghi chú</label>
                    <div class="col-md-7">
                        <telerik:RadTextBox ID="txtRemark" CssClass="col-imp-12 inputForm" Width="100px" runat="server" MaxLength="1500"   TextMode="MultiLine" Resize="Both"/>
                    </div>
                </div>
                <!--End Dòng -->
                 </div>
                 <!--End Block bên trái -->
                 <!--Block bên phải -->
                <div class="form-group col-md-6">
                    <!--Dòng -->
                    <div class="form-group">
                        <label class="col-md-3 control-label">Ngày chuyển</label>
                        <div class="col-md-8">
                            <telerik:RadDatePicker ID="rdpTransferDate" runat="server" Width="140px"   
                        MinDate="01/01/1000" MaxDate="01/01/3000">
                        <Calendar>
                            <SpecialDays>
                                <telerik:RadCalendarDay Repeatable="Today" ItemStyle-CssClass="rcToday">
                                </telerik:RadCalendarDay>
                            </SpecialDays>
                        </Calendar>
                        <DateInput id="txtTransferDate"  style="width:200px" DisplayDateFormat="dd/MM/yyyy" DateFormat="dd/MM/yyyy" readOnly="true"></DateInput>
                                
                </telerik:RadDatePicker>
                            <asp:RequiredFieldValidator ID="PickerRequiredFieldValidator" runat="server" Display="Dynamic" ValidationGroup="g1"
                            ControlToValidate="rdpTransferDate" ErrorMessage="Required(*)"></asp:RequiredFieldValidator>
                         </div>
                    </div>
                    <!--End Dòng -->
                    <%-- <!--Dòng -->
                     <div class="form-group">
                        <label class="col-md-3 control-label">Người cập nhật</label>
                        <div class="col-md-8">
                           <telerik:RadTextBox ID="txtLastUpdatedBy" CssClass="col-imp-4 inputForm" Width="40px" runat="server" readOnly= "true" />
                         </div>
                    </div>
                    <!--End Dòng -->
                    <!--Dòng -->
                     <div class="form-group">
                        <label class="col-md-3 control-label">Ngày cập nhật</label>
                        <div class="col-md-8">
                           <telerik:RadTextBox ID="txtLastUpdatedDateTime" CssClass="col-imp-4 inputForm" Width="40px" runat="server" readOnly= "true" />
                         </div>
                    </div>
                    <!--End Dòng -->--%>
                     <!--Dòng -->
                     <div class="form-group">
                        <label class="col-md-3 control-label">Người xuất kho</label>
                        <div class="col-md-8">
                           <telerik:RadTextBox ID="txtExportedEmployee" CssClass="col-imp-4 inputForm" runat="server" readOnly= "true" />
                         </div>
                    </div>
                    <!--End Dòng -->
                     <!--Dòng -->
                     <div class="form-group">
                        <label class="col-md-3 control-label">Ngày xuất kho</label>
                        <div class="col-md-8">
                           <telerik:RadTextBox ID="txtExportedDate" CssClass="col-imp-4 inputForm" Width="40px" runat="server" readOnly= "true" />
                         </div>
                    </div>
                    <!--End Dòng -->
                    <!--Dòng -->
                     <div class="form-group">
                        <label class="col-md-3 control-label">Tình trạng</label>
                        <div class="col-md-8">
                           <telerik:RadTextBox ID="txtStatus" CssClass="col-imp-4 inputForm" Width="40px" runat="server" readOnly= "true" />
                         </div>
                    </div>
                    <!--End Dòng -->
                         </div>
                 <!--End Block bên phải -->
            </div>
            </fieldset>
            <!--Action-->
            <div class="set-btns text-center">
                <asp:Button ID="btnInput" CssClass="btn btn-sm btn-primary" runat="server" Text="Xác nhận" OnClientClick="return ConfirmOnDelete('Bạn chắc chắn muốn xác nhận?')"  OnClick="btnInput_Click"   />
                <%--<asp:Button ID="btnReject" CssClass="btn btn-sm btn-primary" runat="server" Text="Từ chối"   OnClick="btnReject_Click"  />--%>
                
            </div>
            <!--End Action -->
                <!--Grid data-->
            <div class="row">
            <div style="float: left;font-weight:bold" runat="server" id="div_TotalProduct" >&nbsp;Tổng cộng sản phẩm: 0</div><BR/>
            <telerik:radgrid id="gvProduct" runat="server" cellspacing="0" cssclass=" table table-bordered"
                gridlines="None" autogeneratecolumns="False" Height="200"  headerstyle-horizontalalign="Center" 
                allowmultirowselection="True" headerstyle-borderstyle="None">
                <ClientSettings>
                <Scrolling AllowScroll="True" UseStaticHeaders="True" SaveScrollPosition="true" FrozenColumnsCount="2"></Scrolling>
            </ClientSettings>
                <MasterTableView ShowHeader="true" NoMasterRecordsText="Không có dữ liệu." ShowGroupFooter="true">
                <Columns>
                    <telerik:GridTemplateColumn HeaderText="STT" HeaderButtonType="TextButton" ItemStyle-HorizontalAlign="Center">
                        <ItemTemplate>
                            <%# Container.ItemIndex + 1 %></ItemTemplate>
                        <HeaderStyle Width="50px" />
                        <ItemStyle HorizontalAlign="Center" />
                    </telerik:GridTemplateColumn>
                    <telerik:GridBoundColumn DataField="ProductID" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center"
                                 UniqueName="ProductID" Display="false">
                                <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
                                <ItemStyle HorizontalAlign="Center"></ItemStyle>
                    </telerik:GridBoundColumn>
                    <telerik:GridTemplateColumn HeaderText="Tên sản phẩm" UniqueName="ProductName" DataField="ProductName">
                            <ItemTemplate>
                                <asp:Label ID="lblProductName" runat="server" Text='<%# Eval("ProductName")%>'></asp:Label>
                            </ItemTemplate>
                            <HeaderStyle HorizontalAlign="Center" />
                        <ItemStyle HorizontalAlign="Left" Font-Bold ="true"/>
                    </telerik:GridTemplateColumn>
                    <telerik:GridTemplateColumn HeaderText="Số lượng" UniqueName="Quantity" DataField="Quantity">
                            <ItemTemplate>
                                <asp:Label ID="lblQuantity" runat="server" Text='<%# String.Format("{0:#,#.##}", float.Parse(Eval("Quantity").ToString() == "" ? "0" : Eval("Quantity").ToString()))%>'></asp:Label>
                            </ItemTemplate>
                            <HeaderStyle HorizontalAlign="Center" Width="180px" />
                            <ItemStyle HorizontalAlign="Right" Width="180px" />
                    </telerik:GridTemplateColumn>
                    <telerik:GridTemplateColumn HeaderText="Trọng lượng(kg)" UniqueName="Weight" DataField="Weight">
                            <ItemTemplate>
                                <asp:Label ID="lblWeight" runat="server" Text='<%# String.Format("{0:#,#.##}", float.Parse(Eval("Weight").ToString() == "" ? "0" : Eval("Weight").ToString()))%>'></asp:Label>
                            </ItemTemplate>
                            <HeaderStyle HorizontalAlign="Center" Width="180px" />
                            <ItemStyle HorizontalAlign="Right" Width="180px" />
                    </telerik:GridTemplateColumn>
                     <telerik:GridTemplateColumn HeaderText="Giá nhập(VNĐ)" UniqueName="PurchasePrice" DataField="PurchasePrice">
                            <ItemTemplate>
                                <asp:Label ID="lblPurchasePrice" runat="server" Text='<%# String.Format("{0:#,#.##}", float.Parse(Eval("PurchasePrice").ToString() == "" ? "0" : Eval("PurchasePrice").ToString()))%>'></asp:Label>
                            </ItemTemplate>
                            <HeaderStyle HorizontalAlign="Center" Width="180px" />
                            <ItemStyle HorizontalAlign="Right" Width="180px" />
                    </telerik:GridTemplateColumn>
                    
                    <telerik:GridTemplateColumn HeaderText="Thành tiền(VNĐ)" UniqueName="Amount" DataField="Amount">
                            <ItemTemplate>
                                <asp:Label ID="lblAmount" runat="server" Text='<%# String.Format("{0:#,#.##}", float.Parse(Eval("Amount").ToString() == "" ? "0" : Eval("Amount").ToString()))%>'></asp:Label>
                            </ItemTemplate>
                            <HeaderStyle HorizontalAlign="Center" Width="180px" />
                            <ItemStyle HorizontalAlign="Right" Width="180px" Font-Bold ="true"/>
                    </telerik:GridTemplateColumn>
                   
                    <%--<telerik:GridTemplateColumn HeaderText="Chi tiết" HeaderButtonType="TextButton" ItemStyle-HorizontalAlign="Center">
                        <ItemTemplate>
                            <asp:Button ID="btnEdit" CssClass="btnViewDetail" CommandArgument='<%# Eval("ProductID") %>'
                                CommandName="EditItem" runat="server"></asp:Button>
                        </ItemTemplate>
                        <HeaderStyle HorizontalAlign="Center" Width="100px" />
                        <ItemStyle HorizontalAlign="Center" Width="100px"></ItemStyle>
                    </telerik:GridTemplateColumn>--%>
                    <%--<telerik:GridTemplateColumn HeaderText="Xóa" Visible=true HeaderButtonType="TextButton" ItemStyle-HorizontalAlign="Center">
                        <ItemTemplate>
                            <asp:Button ID="btnDelete" CssClass="btnX" CommandArgument='<%# Eval("ProductID") %>'
                                OnClientClick="return ConfirmOnDelete('Bạn chắc chắn muốn xóa sản phẩm?')" CommandName="DeleteItem"
                                runat="server"></asp:Button>
                        </ItemTemplate>
                        <HeaderStyle Width="30px"/>
                            <ItemStyle HorizontalAlign="Center" />
                    </telerik:GridTemplateColumn>--%>
                </Columns>
                </MasterTableView>
            </telerik:radgrid>
        <div id="divTotalQuantity" runat="server" class="sum-total" style="width: 310px; float:right; font-weight: bold;font-size:13pt;">Tổng số lượng: 0</div>
        <div style="clear:both"></div>
        <div id="divTotalWeight" runat="server" class="sum-total" style="width: 310px; float:right; font-weight: bold;font-size:13pt;">Tổng số lượng: 0 Kg</div>
        <div style="clear:both"></div>
        <div id="divTotalAmount" runat="server" class="sum-total" style="width: 310px; float: right; font-weight: bold;font-size:13pt;">Tổng tiền: 0 VNĐ</div>
        <div style="clear:both"></div>
        <div id="divGetTotalQuantity" runat="server" class="sum-total" style="display:none;"></div>
        <div style="clear:both"></div>
        <div id="divGetTotalAmount" runat="server" class="sum-total" style="display:none;"></div>
        </div>
            <!--End Grid data-->
                  </MasterTableView>
                </telerik:RadPageView>
             <!--End Tab thông tin chung -->
            <!--Tab Nhan don hang chuyển đến -->
            <telerik:RadPageView ID="RadPageView3" runat="server"  Style="overflow: hidden">
                 <fieldset class="form" id="Fieldset1">
                  <br />
                <div class="form-horizontal wrapper-center clearfix">
                    <!--Block bên trái -->
                 <div class="form-group col-md-6">
                      <!--Dòng -->
                    <div class="form-group">
                        <label class="col-md-3 control-label">
                            Mã luân chuyển</label>
                        <div class="col-md-8">
                            <telerik:RadTextBox ID="txtTransferWarehouseCodeReceived" CssClass="col-imp-8 inputForm" Width="40px" runat="server"  />
                        </div>
                    </div>
                  <!--End Dòng -->
                      <!--Dòng -->
                <div class="form-group">
                    <label class="col-md-3 control-label">Tỉnh/thành phố</label>
                    <div class="col-md-8">
                        <telerik:RadComboBox ID="cbProvinceSearch" runat="server" CssClass="col-imp-8" TabIndex="1" Width="70px" AllowCustomText="false"   AutoPostBack="true" OnSelectedIndexChanged="cbProvince_SelectedIndexChanged"  />
                        
                     </div>
                </div>
                <!--End Dòng -->
                     <!--Dòng -->
                    <div class="form-group">
                        <label class="col-md-3 control-label">
                            Cửa hàng nhận</label>
                        <div class="col-md-8">
                            <telerik:RadComboBox ID="cbToShopReceived" runat="server" CssClass="col-imp-8" TabIndex="1" Width="70px" AllowCustomText="false" />
                        </div>
                    </div>
                  <!--End Dòng -->
                  <!--Dòng -->
                    <div class="form-group">
                        <label class="col-md-3 control-label">
                            Cửa hàng chuyển</label>
                        <div class="col-md-8">
                            <telerik:RadComboBox ID="cbFromShopReceived" runat="server" CssClass="col-imp-8" TabIndex="1" Width="70px" AllowCustomText="false" />
                        </div>
                    </div>
                  <!--End Dòng -->
                     
                     <%--<!--Dòng -->
                    <div class="form-group">
                        <label class="col-md-3 control-label">
                            Thuộc loại</label>
                        <div class="col-md-7">
                            
                            <telerik:RadComboBox ID="RadComboBox2" runat="server" CssClass="col-imp-5" AllowCustomText="false" >
                                <Items>
                                    <telerik:RadComboBoxItem Text="---Tất cả---" Value="" />
                                    <telerik:RadComboBoxItem Text="Gạo" Value="R" />
                                    <telerik:RadComboBoxItem Text="Quà tặng" Value="P" />
                                </Items>
                            </telerik:RadComboBox>
                        </div>
                    </div>
                  <!--End Dòng -->--%>
                </div>
                 <!--End Block bên trái -->
                     <!--Block bên phải -->
                <div class="form-group col-md-6">
                    <!--Dòng -->
                    <div class="form-group">
                        <label class="col-md-3 control-label">Từ ngày xuất kho</label>
                        <div class="col-md-8">
                          <telerik:RadDatePicker ID="rtpFromExportedDateSearch" cssclass="col-imp-8" enabled="true" runat="server" Culture="en-GB"  DateFormat="dd/MM/yyyy" readOnly ="true">
                                <Calendar ID="Calendar1" runat="server" EnableKeyboardNavigation="true" ViewSelectorText="x" Skin="Hay" UseRowHeadersAsSelectors="False" UseColumnHeadersAsSelectors="False">
                                </Calendar>
                                <DateInput  style="width:200px" DisplayDateFormat="dd/MM/yyyy" DateFormat="dd/MM/yyyy"  readOnly ="true"></DateInput>
                            </telerik:RadDatePicker>
                         </div>
                    </div>
                    <!--End Dòng -->
                    <!--Dòng -->
                    <div class="form-group">
                        <label class="col-md-3 control-label">Đến ngày xuất kho</label>
                        <div class="col-md-8">
                            <telerik:RadDatePicker ID="rtpToExportedDateSearch" cssclass="col-imp-8" enabled="true" runat="server" Culture="en-GB" DateFormat="dd/MM/yyyy" readOnly ="true">
                                <Calendar ID="Calendar2" runat="server" EnableKeyboardNavigation="true" ViewSelectorText="x" Skin="Hay" UseRowHeadersAsSelectors="False" UseColumnHeadersAsSelectors="False">
                                </Calendar>
                                <DateInput  style="width:200px" DisplayDateFormat="dd/MM/yyyy" DateFormat="dd/MM/yyyy"  readOnly ="true"></DateInput>
                            </telerik:RadDatePicker>
                         </div>
                    </div>
                    <!--End Dòng -->
                    <!--Dòng -->
                    <div class="form-group">
                        <label class="col-md-3 control-label">
                            Tình trạng</label>
                        <div class="col-md-7">
                            <telerik:RadComboBox ID="cbStatusReceived" runat="server" CssClass="col-imp-5" AllowCustomText="false"  >
                                <Items>
                                    <telerik:RadComboBoxItem Text="Đã xuất kho" Value="T" />
                                    <telerik:RadComboBoxItem Text="Đã xác nhận" Value="F" />
                                    
                                </Items>
                            </telerik:RadComboBox>
                        </div>
                    </div>
                  <!--End Dòng -->
                </div>
                 <!--End Block bên phải -->
                </div>
                <!--Button Tim Kiem-->
                 <div class="set-btns text-center">
                     <asp:Button ID="btnSearchReceived" CssClass="btn btn-sm btn-primary" runat="server" OnClick="btnSearchReceived_Click" Text="Tìm kiếm"  />
                </div> 
                <!--End Button Tim Kiem--> 
                </fieldset>
        <br />
        <!--Grid data-->
            <div class="row">
                <div style="float: left;font-weight:bold" runat="server" id="div_TotalRows" >&nbsp;Kết quả tìm kiếm: 0</div>
                <div style="float: right;"><asp:Button ID="btnRefresh" CssClass="btnRefresh" ToolTip="Refresh" runat="server"  Text="Refresh" OnClick="btnRefresh_Click"  /></div> 
            <telerik:radgrid id="gvReceived" runat="server" cellspacing="0" cssclass=" table table-bordered"
                gridlines="None" autogeneratecolumns="False" headerstyle-horizontalalign="Center" PageSize="10" AllowCustomPaging="true"
                allowmultirowselection="True" headerstyle-borderstyle="None" Height="250" ShowHeader="true" OnNeedDataSource="gvReceived_NeedDataSource"  OnItemCommand="gvReceived_ItemCommand">
                
                <MasterTableView ShowHeader="true" NoMasterRecordsText="Không có dữ liệu." ShowGroupFooter="true" AllowPaging="True" PageSize="10" EditMode="InPlace">
                <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column"></RowIndicatorColumn>
                 <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column"></ExpandCollapseColumn>
                <Columns>
                    <telerik:GridTemplateColumn HeaderText="STT" HeaderButtonType="TextButton" ItemStyle-HorizontalAlign="Center">
                        <ItemTemplate>
                            <%# Eval("RowID") %></ItemTemplate>
                        <HeaderStyle Width="30px" />
                        <ItemStyle HorizontalAlign="Center" />
                    </telerik:GridTemplateColumn>
                    <telerik:GridBoundColumn  DataField="TransferWarehouseCode" UniqueName="TransferWarehouseCode"  ReadOnly="true" HeaderText="Mã luân chuyển">
                        <HeaderStyle HorizontalAlign="Center"  Width="100px" />
                        <ItemStyle HorizontalAlign="Center" />
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn  DataField="ToShopName" UniqueName="ToShopName"  ReadOnly="true" HeaderText="Cửa hàng nhận">
                        <HeaderStyle HorizontalAlign="Center"  Width="100px" />
                        <ItemStyle HorizontalAlign="Left" />
                    </telerik:GridBoundColumn>
                     <telerik:GridBoundColumn  DataField="FromShopName" UniqueName="FromShopName"  ReadOnly="true" HeaderText="Cửa hàng chuyển">
                        <HeaderStyle HorizontalAlign="Center"  Width="100px" />
                        <ItemStyle HorizontalAlign="Left" />
                    </telerik:GridBoundColumn>
                    
                    <telerik:GridTemplateColumn HeaderText="Số lượng" UniqueName="Weight" DataField="TotalQuantity">
                            <ItemTemplate>
                                <asp:Label ID="Label3" runat="server" Text='<%# String.Format("{0:#,#.##}", float.Parse(Eval("TotalQuantity").ToString() == "" ? "0" : Eval("TotalQuantity").ToString()))%>'></asp:Label>
                            </ItemTemplate>
                            <HeaderStyle HorizontalAlign="Center" Width="180px" />
                            <ItemStyle HorizontalAlign="Right" Width="180px" />
                    </telerik:GridTemplateColumn>
                    <telerik:GridTemplateColumn HeaderText="Thành tiền(VNĐ)" UniqueName="Amount" DataField="Amount">
                            <ItemTemplate>
                                <asp:Label ID="Label4" runat="server" Text='<%# String.Format("{0:#,#.##}", float.Parse(Eval("TotalAmount").ToString() == "" ? "0" : Eval("TotalAmount").ToString()))%>'></asp:Label>
                            </ItemTemplate>
                            <HeaderStyle HorizontalAlign="Center" Width="180px" />
                            <ItemStyle HorizontalAlign="Right" Width="180px" Font-Bold ="true"/>
                    </telerik:GridTemplateColumn>
                    <telerik:GridBoundColumn  DataField="TransferShortDate" UniqueName="TransferShortDate"  ReadOnly="true" HeaderText="Ngày chuyển">
                        <HeaderStyle HorizontalAlign="Center"  Width="100px" />
                        <ItemStyle HorizontalAlign="Center" />
                    </telerik:GridBoundColumn>
                     <telerik:GridBoundColumn  DataField="StatusName" UniqueName="StatusName"  ReadOnly="true" HeaderText="Tình trạng">
                        <HeaderStyle HorizontalAlign="Center" Width="100px" />
                        <ItemStyle HorizontalAlign="Center" /></telerik:GridBoundColumn>
                    <telerik:GridTemplateColumn HeaderText="Chi tiết" HeaderButtonType="TextButton" ItemStyle-HorizontalAlign="Center">
                        <ItemTemplate>
                            <asp:Button ID="Button4" CssClass="btnViewDetail" CommandArgument='<%# Eval("TransferWarehouseID") %>'
                                CommandName="EditItem" runat="server"></asp:Button>
                        </ItemTemplate>
                        <HeaderStyle HorizontalAlign="Center" Width="50px" />
                        <ItemStyle HorizontalAlign="Center" ></ItemStyle>
                    </telerik:GridTemplateColumn>
                    <%--<telerik:GridTemplateColumn HeaderText="Xóa" Visible=true HeaderButtonType="TextButton" ItemStyle-HorizontalAlign="Center">
                        <ItemTemplate>
                            <asp:Button ID="Button2" CssClass="btnX" CommandArgument='<%# Eval("TransferWarehouseID") %>'
                                OnClientClick="return ConfirmOnDelete('Bạn chắc chắn muốn xóa không?')" CommandName="DeleteItem"
                                runat="server"></asp:Button>
                        </ItemTemplate>
                        <HeaderStyle Width="30px"/>
                            <ItemStyle HorizontalAlign="Center" />
                    </telerik:GridTemplateColumn>--%>
                </Columns>
                </MasterTableView>
            </telerik:radgrid>
        </div>
            <!--End Grid data--> 
    </telerik:RadPageView>
    <!--End Tab nhan đơn hàng chuyển đến -->
     </telerik:RadMultiPage>
<div style="clear:both"></div>
</ContentTemplate>
</asp:UpdatePanel>

<div class="progressbar">
    <asp:UpdateProgress ID="up" runat="server" AssociatedUpdatePanelID="UpdatePanel1">
        <ProgressTemplate>
            <div class="bg">
                <div class="progress progress-striped active">
                    <div class="progress-bar" role="progressbar" aria-valuenow="45" aria-valuemin="0"
                        aria-valuemax="100" style="width: 100%">
                        <span class="sr-only">100% Complete</span>
                    </div>
                </div>
            </div>
        </ProgressTemplate>
    </asp:UpdateProgress>
</div>

<script type="text/javascript">
    function OnClientClose(oWnd, args) {

    }
    function FormatNumber(obj) {

        var x;

        if (eval(obj))

            x = eval(obj).value;

        else

            x = obj;

        var num = x.replace(/$|,/g, '');

        if (isNaN(num)) { num = ""; }

        sign = (num == (num = Math.abs(num)));

        num = Math.floor(num * 100 + 0.50000000001);

        num = Math.floor(num / 100).toString();

        for (var i = 0; i < Math.floor((num.length - (1 + i)) / 3) ; i++) {

            num = num.substring(0, num.length - (4 * i + 3)) + ',' + num.substring(num.length - (4 * i + 3));

        }

        eval(obj).value = num;

    }
</script>
